]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
main: Don't set stage key focus to stage itself
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 10 Feb 2025 23:42:45 +0000 (00:42 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 14 Feb 2025 19:23:48 +0000 (20:23 +0100)
Moving the key focus to the stage should be done by unsetting
the key focus, not by setting it to the stage itself.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3633>

js/ui/main.js

index 2705a4026682a7c824a0c4a92bfdc0beeacecfcd..4d8079a4d86d2d97c39ca82db16e7f6aa189fce5 100644 (file)
@@ -737,7 +737,8 @@ export function pushModal(actor, params = {}) {
     });
 
     actionMode = newActionMode;
-    global.stage.set_key_focus(actor);
+    const newFocus = actor === global.stage ? null : actor;
+    global.stage.set_key_focus(newFocus);
     return grab;
 }